<template>
	<view>
		<u-tag :text="actives.text" :type="statusBtn" plain size="mini"></u-tag>
	</view>
</template>

<script>
	// import {getIntDictOptions} from '@/utils/auth'
	import {getDictOptions} from '@/utils/auth.js'
	export default {
		props:{
			type:{
				type:String,
				default:'',
			},
			value:'',
			statusBtn:{
				type:String,
				default:'warning'
			}
		},
		watch:{
			// getIntDictOptions
		},
		data() {
			return {
				actives:{}
			};
		},
		methods:{
			
		},
		async created() {
			let Options = getDictOptions()
			let arr = [];
			Options.forEach(item=>{
				if(item.dictType ==this.type){
					arr.push({
					  value: item.value,
					  text: item.label,
					  colorType: item.colorType,
					  cssClass: item.cssClass
					})
				}
			})
			this.actives = arr.find(item=>{
				return item.value == this.value
			})
		}
	}
</script>

<style lang="less" scoped>

</style>
